-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Conversation
95a817d
to
da0dcd7
Compare
6e13229
to
41be8e7
Compare
Example:
|
Wydt about not returning the empty metadata fields? Too breaky? I split that into its own commit, so easy to revert if need be. |
I'm in favor of it for this new details level but it would be a breaking change if the other responses are impacted because some sdk's and clients may expect those fields to be always present (though the web3 and rust sdk's wouldn't be impacted from what I can tell) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Direction looks good to me!
7179a78
to
3bddfa1
Compare
Okay, please see the last commit for an implementation that preserve current serialization for existing parameter inputs, but only includes the necessary fields for TransactionDetails::Accounts. Wdyt @jstarry? |
The wrapper looks ok I think but I'm worried that approach leads to too many struct permutations if in the future we want to selectively enable / disable certain fields. It would be nice if we had more granular control over what gets serialized. What do you think about replacing some usages of |
Oh hmm, adding a wrapper enum and removing the Option is an interesting idea. I'll try that out and if it seems feasible, push as a separate PR to rebase this one on, so we can see what it looks like in isolation. |
Updated labels to v1.13 & v1.14 which are effectively the new v1.10 and v1.11 See discussion on Discord in #releng and #proj-quic-tpu for more context. |
3bddfa1
to
750a083
Compare
Updated, needs rebase on #27676 |
750a083
to
8f5472b
Compare
8f5472b
to
3b5bd89
Compare
* Add new transaction details level * Dedupe common code * Update docs * Respect showRewards parameter in tx meta (cherry picked from commit 973a5fb) # Conflicts: # docs/src/developing/clients/jsonrpc-api.md
* Add new transaction details level * Dedupe common code * Update docs * Respect showRewards parameter in tx meta (cherry picked from commit 973a5fb)
* Add new transaction details level * Dedupe common code * Update docs * Respect showRewards parameter in tx meta (cherry picked from commit 973a5fb)
* Add new transaction details level * Dedupe common code * Update docs * Respect showRewards parameter in tx meta (cherry picked from commit 973a5fb)
Toss me a note (eg. #28999) whenever you see this happening so that I can update the JavaScript client API. In the near future we're going to make this sort of thing impossible to miss by codegenerating the JS types from the Rust implementation, but until then I could use the pings! <3 |
Problem
Responses for
getBlock
rpc requests can be huge. TheTransactionDetails
parameter enables reducing returned transactions to just signatures, or eliminating the details altogether. But any consumer that needs to track account balance changes in each block (an exchange, eg) has to pull the full details, even though they don't need instruction data, inner-instruction or log details, etc.Summary of Changes
Add a new TransactionDetails level that slims each transaction in a block to just pre/postBalances (sol and token), signatures, and the list of accounts.